//
//  IComMediator.h
//  ICome
//
//  Created by zhangrongwu on 16/9/26.
//  Copyright © 2016年 iCom. All rights reserved.
//  调度器 所有模块化后需要打开的VC都通过该类调取对应模块Category中的方法打开页面

#import <Foundation/Foundation.h>

typedef void (^IComMediatorObjectHandler)(id result);

@interface IComMediator : NSObject

+(instancetype)sharedInstance;

// 远程App调用入口
- (id)performActionWithUrl:(NSURL *)url completion:(void(^)(NSDictionary *info))completion;

// 本地组件调用入口
- (id)performTarget:(NSString *)targetName action:(NSString *)actionName params:(NSDictionary *)params;

// 充分模块化解耦 存储block用页面跳转调用
- (id)performTarget:(NSString *)targetName action:(NSString *)actionName params:(NSDictionary *)params completion:(IComMediatorObjectHandler)completion;
// 所有b页面回调
- (void)toHandlerTargetName:(NSString *)targetName action:(NSString *)actionName params:(id)params;

@end
